import { mapData } from '@/utils/noTrueData';
import { Button, Grid, ProductCard, Tag } from 'react-vant';
import { history } from 'umi';
export default (props) => {
  const mapGo = (id: number) => {
    props.setTab('home');
    props.setMapId(id);
  };
  return (
    <div>
      {/* <Grid columnNum={3}>
        {mapData() &&
          mapData().map((item) => (
            <Grid.Item key={item.id}>
              {' '}
              <Button type="primary" onClick={() => mapGo(item.id)}>
                {item.name}
              </Button>
            </Grid.Item>
          ))}
      </Grid> */}
      {mapData() &&
        mapData().map((item) => (
          <ProductCard
            // tag="标签"
            // num="2"
            // price="2.00"
            // originPrice="10.00"
            priceTop="等级"
            bottom="1-5"
            // desc="描述信息"
            title={item.name}
            key={item.id}
            onClick={() => mapGo(item.id)}
            thumb="https://img.yzcdn.cn/vant/cat.jpeg"
          />
        ))}
    </div>
  );
};
